Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete all files and all hidden files without . & .. error for PV recycler #16723

Merged
merged 1 commit into from
Nov 4, 2015

Conversation

wulonghui
Copy link
Contributor

When PV recycling, it failed:

$ kubectl get pv
NAME      LABELS       CAPACITY   ACCESSMODES   STATUS    CLAIM           REASON    AGE
pv0001    type=local   10Gi       RWO           Failed    default/test3             11m

The default PV recycler Pod command to delete all files and all hidden files is:

rm -rf /scrub/* /scrub/.*

this will cause error, because it try to delete . and ..

rm: can't remove '.' or '..'
rm: can't remove '.' or '..'

so replace the rm command by:

find /scrub -mindepth 1 -maxdepth 1 -delete

@k8s-bot
Copy link

k8s-bot commented Nov 3, 2015

Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist")

If this message is too spammy, please complain to ixdy.

1 similar comment
@k8s-bot
Copy link

k8s-bot commented Nov 3, 2015

Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist")

If this message is too spammy, please complain to ixdy.

@k8s-github-robot
Copy link

Labelling this PR as size/XS

@k8s-github-robot k8s-github-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Nov 3, 2015
@thockin thockin assigned markturansky and unassigned thockin Nov 3, 2015
@markturansky
Copy link
Contributor

@wulonghui thanks. I am not a bash expert :)

LGTM

@markturansky markturansky added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 3, 2015
@k8s-github-robot
Copy link

@k8s-bot ok to test

pr builder appears to be missing, activating due to 'lgtm' label.

@k8s-bot
Copy link

k8s-bot commented Nov 3, 2015

GCE e2e test build/test passed for commit 86abfb8.

@k8s-github-robot
Copy link

The author of this PR is not in the whitelist for merge, can one of the admins add the 'ok-to-merge' label?

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Nov 4, 2015

GCE e2e test build/test passed for commit 86abfb8.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

k8s-github-robot pushed a commit that referenced this pull request Nov 4, 2015
@k8s-github-robot k8s-github-robot merged commit 75ecc34 into kubernetes:master Nov 4, 2015
@tanen01
Copy link

tanen01 commented Jan 19, 2016

Can this fix be merged/back-ported to v1.1.x?
Or must we upgrade to v1.2 to get this fix?

@thockin
Copy link
Member

thockin commented Jan 19, 2016

backport PR is in flight

brendandburns added a commit that referenced this pull request Jan 19, 2016
…3-upstream-release-1.1

Automated cherry pick of #16723 upstream release 1.1
@tanen01
Copy link

tanen01 commented Feb 1, 2016

Unfortunately the fix didn't work

$ docker logs ....
find: unrecognized: -delete
BusyBox v1.22.1 (2014-05-22 23:22:11 UTC) multi-call binary.

It looks like the "find" command from gcr's busybox does not support -delete option.

@childsb
Copy link
Contributor

childsb commented Feb 1, 2016

same as @tanen01 . the CLI for find is wrong in this change
.

shyamjvs pushed a commit to shyamjvs/kubernetes that referenced this pull request Dec 1, 2016
…k-of-#16723-upstream-release-1.1

Automated cherry pick of kubernetes#16723 upstream release 1.1
shouhong pushed a commit to shouhong/kubernetes that referenced this pull request Feb 14, 2017
…k-of-#16723-upstream-release-1.1

Automated cherry pick of kubernetes#16723 upstream release 1.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants